/**
 * 动态规划，空间复杂度O(N)
 * @param {number[]} nums
 * @return {number}
 */
var findLengthOfLCIS = function(nums) {
    let dp = new Array(nums.length).fill(0),
    max = 0;

    for(let i = 1;i<nums.length;i++){
        if(nums[i]>nums[i-1]){
            dp[i] = dp[i-1] + 1
            max = Math.max(dp[i],max)
        }
    }

    return max + 1
};